import clsx from 'clsx';
import Heading from '@theme/Heading';
import styles from './styles.module.css';
import Link from "@docusaurus/Link";

type FeatureItem = {
  title: string;
  Svg: React.ComponentType<React.ComponentProps<'img'>>;
  description: JSX.Element;
  url:string;
};

const FeatureList: FeatureItem[] = [
  {
    title: 'vLLM文档(翻译)',
    Svg: require('@site/static/resources/ai/vllm_logo.png').default,
    description: (
      <>
          vLLM是一个快速易用的LLM推理和服务托管库
      </>
    ),
      url:'/docs/category/开始'
  },
  {
    title: 'LangChain文档(翻译)',
    Svg: require('@site/static/resources/ai/langchain_logo.png').default,
    description: (
      <>

          LangChain是一个基于语言模型开发应用程序的框架
      </>
    ),
      url:'/docs/ai/langchain/start/introduction'
  },
  {
    title: 'AgentGPT文档(翻译)',
    Svg: require('@site/static/resources/ai/agentgpt_logo.png').default,
    description: (
      <>

          AgentGPT 是一个自主 AI 智能体平台，使用户能够直接在浏览器中创建和部署可定制的自主 AI 智能体。
      </>
    ),
      url:'/docs/ai/agent-gpt/start/introduction'
  },
];

function Feature({title, Svg, description, url}: FeatureItem) {
  return (

    <div className={clsx('col col--4')}>
        <Link href={url}>
      <div className="text--center">
        <img className={styles.featureSvg} src={Svg} />
      </div>
      <div className="text--center padding-horiz--md">
        <Heading as="h3">{title}</Heading>
        <p className="text--left">{description}</p>
      </div>
        </Link>
    </div>

  );
}

export default function HomepageFeatures(): JSX.Element {
  return (
    <section className={styles.features}>
      <div className="container">
        <div className="row">
          {FeatureList.map((props, idx) => (
            <Feature key={idx} {...props} />
          ))}
        </div>
      </div>
    </section>
  );
}
